/*
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2024-01-08 16:02:16
 * @LastEditors: huangtianyang
 * @LastEditTime: 2024-01-08 16:27:38
 * @FilePath: \cxl-driving-training\src\apis\order\index.ts
 */
import axios from '../../axios/index'

export interface orderPageInterface {
    current: number
    size: number
    customerSource?: number
    orderNo?: string
    orderStatus?: number //订单状态(0.待支付；1.已支付；2.已取消；3.已关闭；4.退款中；5.已退款)
    schoolId?: string
    endCreateTime?: string
    startCreateTime?: string
}

/**
 * 订单列表
 * @param params
 * @returns
 */
export const orderList = (params: orderPageInterface) => {
    return axios({
        method: 'get',
        url: '/api/mall/order/manage/pageList',
        params
    })
}

/**
 * 订单详情
 */
export const orderDetailedById = (orderId: string) => {
    return axios({
        method: 'get',
        url: '/api/mall/order/manage/detailInfo',
        params: { orderId }
    })
}
